home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 145 / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin / tools / sharp / sxwork3.lzh / 福袋 / 注釈付ヘッダ / DIALOG.H < prev    next >
Text File  |  1994-02-20  |  4KB  |  137 lines

  1. /*
  2.  * dialog.h X68k SX_SYSTEM ver 2.01 Copyright 1994 SHARP/First Class Technology
  3.  */
  4. #ifndef __DIALOG_H
  5. #define __DIALOG_H
  6.  
  7. #ifndef __SXDEF2_H
  8. #include <sxdef2.h>
  9. #endif
  10. #ifndef __WINDOW_H
  11. #include <window.h>
  12. #endif
  13.  
  14. #ifdef FORWORD
  15. #define __PROTO_TYPE
  16. #endif
  17. #ifdef __STDC__
  18. #define __PROTO_TYPE
  19. #endif
  20.  
  21. typedef struct DItem    DItem;        /* ダイアログアイテム        */
  22. typedef struct DIList    DIList;        /* アイテムリスト        */
  23. typedef struct DLOG    DLOG;        /* ダイアログテンプレート    */
  24. typedef struct DIList    DITL;        /* ダイアログアイテムテンプレート */
  25. /*
  26.  *    ダイアログマン (Dialog Man)
  27.  */
  28. /* ダイアログのアイテムタイプ */
  29. #define D_USER        0x00        /* ユーザーアイテム        */
  30. #define D_CHRBTN    0x04        /* 文字ボタン            */
  31. #define D_RADBTN    0x05        /* ラジオボタン            */
  32. #define D_CHKBOX    0x06        /* チェックボックス        */ 
  33. #define D_RSCITM    0x07        /* スクロールバー        */
  34. #define D_STCTXT    0x08        /* 固定テキスト            */
  35. #define D_EDTTXT    0x10        /* 編集可能テキスト        */
  36. #define D_ICNITM    0x20        /* アイコン            */
  37. #define D_PICITM    0x40        /* グラフスクリプト        */
  38. #define D_DISABL    0x80        /* 未帰還属性            */
  39.  
  40. enum ErrorType {            /* エラーダイアログのアイテムタイプ */
  41.     D_CONFIRM    = 1,        /* 「確認」ボタン        */
  42.     D_YESNO        = 4,        /* 「はい」/「いいえ」ボタン    */
  43.     D_SAVE,                /* 「保存」/「終了」ボタン    */
  44.     D_EXEC,                /* 「実行」/「取消」ボタン    */
  45.     D_CONT                /* 「継続」/「中止」ボタン    */
  46. };
  47.  
  48. /* エラーダイアログのアイテムタイプ */
  49. #define D_YELLOW    0        /* イエローフラッグ        */
  50. #define D_RED        (1 << 8)    /* レッドフラッグ        */
  51.  
  52. struct Dialog {                /* ダイアログレコード        */
  53.     Window window;            /* ウインドウレコード        */
  54.     DIList **itemList;        /* アイテムリストへのハンドル    */
  55.     TEdit **tEdit;            /* テキストエディットハンドル    */
  56.     short edit;            /* 内部で使用(テキストマン用)    */
  57.     short eOpen;            /* 内部で使用(テキストマン用)    */
  58.     short rsv;            /* システム予約            */
  59. };
  60.  
  61. struct DItem {                /* ダイアログアイテム        */
  62.     Handle item;            /* アイテムへのハンドル        */
  63.     Rect bounds;            /* アイテムへのレクタングル    */
  64.     unsigned char type;        /* アイテムタイプ        */
  65.     unsigned char size;        /* 初期データサイズ        */
  66.     unsigned char data[_VARLEN];    /* 初期データ(可変長データ)    */
  67. };
  68.  
  69. struct DIList {                /* アイテムリスト        */
  70.     short number;            /* アイテムの個数-1        */
  71.     DItem items[_VARLEN];        /* 個数分のアイテムレコード
  72.                        (可変長データ)        */
  73. };
  74.  
  75. struct DLOG {                /* ダイアログテンプレート    */
  76.     Rect bounds;            /* ダイアログのレクタングル    */
  77.     short defID;            /* リソースWDEFのID×16    */
  78.     short visible;            /* 可視フラグ            */
  79.     short close;            /* クローズボタン使用フラグ    */
  80.     long taskID;            /* タスクID            */
  81.     short itemID;            /* リソースDITLのID        */
  82.     LASCII title;            /* ダイアログタイトル        */
  83. };
  84.  
  85. #ifdef __PROTO_TYPE
  86.  
  87. void DMInit(void);
  88. void DMFontSet(int);
  89. Dialog *DMOpen(Dialog *, Rect *, const _LASCII, BOOLEAN, int, Window *, BOOLEAN, long, _Handle);
  90. Dialog *DMRefer(int, Dialog *, Window *);
  91. int DMClose(Dialog *);
  92. int DMDispose(Dialog *);
  93. int DMControl(int (*)(Dialog *, Event *));
  94. int DMDraw(Dialog *);
  95. int DIGet(Dialog *, int, short *, Handle *, Rect *);
  96. int DISet(Dialog *, int, short, Handle, Rect *);
  97. int DITGet(short, Handle, _LASCII);
  98. int DITSet(short, Handle, const _LASCII);
  99. int DITSelect(Dialog *, int, long, long);
  100. int DIUpdate(Dialog *, Region **);
  101. int DMBeep(int);
  102. int DIHide(Dialog *, int);
  103. int DIShow(Dialog *, int);
  104. int DMError(int, const char *);
  105. int DMWaitOpen(void);
  106. int DMWaitClose(void);
  107. int DMWaitWhile(void);
  108.  
  109. #undef __PROTO_TYPE
  110. #else
  111.  
  112. void DMInit();
  113. void DMFontSet();
  114. Dialog *DMOpen();
  115. Dialog *DMRefer();
  116. int DMClose();
  117. int DMDispose();
  118. int DMControl();
  119. int DMDraw();
  120. int DIGet();
  121. int DISet();
  122. int DITGet();
  123. int DITSet();
  124. int DITSelect();
  125. int DIUpdate();
  126. int DMBeep();
  127. int DIHide();
  128. int DIShow();
  129. int DMError();
  130. int DMWaitOpen();
  131. int DMWaitClose();
  132. int DMWaitWhile();
  133.  
  134. #endif __PROTO_TYPE
  135.  
  136. #endif __DIALOG_H
  137.